"""
Web configuration module
"""

title = "Genetrack Browser"

#
# directory setup
#
home = "/cygwin/home/ialbert/sources/genetrack-project/home"
template_dir = home + "/html"
session_dir  = home + "/html/session"
static_dir   = home + "/html/static"
static_url   = "/static"

#
# database setup
#
organism = "yeast"
hdf_database = "%s/db/%s-data.hdf" % (home, organism)
sql_uri = "sqlite:///%s/db/%s-data.sqlite" % (home, organism)

# the value of the chrom_fields could be hardcoded but 
# we can also dynamically generate it
data_label = 'H2AZ'
from atlas import hdf
db = hdf.hdf_open( hdf_database, mode='r', title='Test database' )
data = hdf.GroupData(db=db, name=data_label)
db.close()

# the used to generate the chromosome dropdown menu
chrom_fields = [ (x,x) for x in data.labels ]

# used to generate the zoom dropdown menu
levels = [ 50, 100, 250, 500, 1000, 2500, 5000, 10000, 20000, 50000, 100000, 200000 ]
zoom_levels  = [ (x, x) for x in map(str, levels) ]

# alternative configurations
multi_config = [ ]

#
# socket related configuration
#
socket_port = 8080
socket_host = "localhost"
thread_pool = 10

